<template>
  <div id=""app>
    <TAbBar>
      <tar-bar-item path="/home" >
        <img slot="item-icon" src="~assets/img/tabbar/home.svg">
        <img slot="item-icon-active" src="~assets/img/tabbar/home_active.svg">
        <div slot="item-text">首页</div>
      </tar-bar-item>
      <tar-bar-item path="/category">
        <img slot="item-icon" src="~assets/img/tabbar/category.svg">
        <img slot="item-icon-active" src="~assets/img/tabbar/category_active.svg">
        <div slot="item-text">分类</div>
      </tar-bar-item>
      <tar-bar-item path="/cart">
        <img slot="item-icon" src="~assets/img/tabbar/shopcart.svg">
        <img slot="item-icon-active" src="~assets/img/tabbar/shopcart_active.svg">
        <div slot="item-text">购物车</div>
      </tar-bar-item>
      <tar-bar-item path="/profile">
        <img slot="item-icon" src="~assets/img/tabbar/profile.svg">
        <img slot="item-icon-active" src="~assets/img/tabbar/profile_active.svg">
        <div slot="item-text">我的</div>
      </tar-bar-item>
    </TAbBar>
    <router-view></router-view>
  </div>
</template>

<script>
  import TAbBar from "./components/tabbar/TAbBar";
  import TarBarItem from "./components/tabbar/TarBarItem";


  export default {
    name: 'app',
    components: {
      TAbBar,
      TarBarItem
    }
  }
</script>

<style>
  @import "./assets/css/base.css";

  .tab-bar-item{
    flex: 1;
    text-align: center;
    height: 49px;
    font-size: 14px;
  }
  .tab-bar-item>img{
    height: 24px;
    width: 24px;
    margin-top: 3px;
    vertical-align: middle;
  }
</style>
